<template>
    <div class="w-full h-full flex flex-col">
        <div class="w-full  flex flex-col">
            <el-page-header @back="$router.back()" :content="s_video.m_video.id ? '编辑视频' : '添加视频'">
            </el-page-header>
            <el-divider class=" mb-w10"></el-divider>
        </div>
        <div class="w-full h-w800 flex flex-col overflow-y-auto ">
            <div class="flex flex-row items-center w-w1/2 h-w50 leading-w50 text-c3 text-f16  mt-w30">
                <div class=" w-w1/4 text-right pr-w20">视频标题</div>
                <el-input class="w-w2/4" placeholder="请输入内容" v-model="s_video.m_video.title" clearable autofocus>
                </el-input>
            </div>
            <div class="flex flex-row items-center w-w1/2 h-w50 leading-w50 text-c3 text-f16  mt-w30">
                <div class=" w-w1/4 text-right pr-w20">选择公司</div>
                <el-select class="w-w2/4" v-model="s_video.m_video.arr_company" placeholder="请选择" multiple>
                    <el-option v-for="item in s_report.list_company" :key="item.id" :label="item.name"
                        :value="item.id + ''">
                    </el-option>
                </el-select>
            </div>
            <div class="flex flex-row items-start  w-w1/2   text-c3 text-f16  mt-w30">
                <div class=" w-w1/4 text-right pr-w20 ">列表封面</div>
                <div class="flex flex-col">
                    <el-upload action="" :show-file-list="false" :on-change="action_select_file_cover"
                        :auto-upload="false" accept="image/png, image/jpeg">
                        <img v-if="s_video.m_video.coverUrl" :src="s_video.m_video.coverUrl"
                            style="width: 140px;height: 85px;  display: block;">
                        <i v-else class="el-icon-plus avatar-uploader-icon"
                            style="width:140px;height:85px;line-height:85px;"></i>
                    </el-upload>
                    <div class=" mt-w5 text-f15 text-c6">图片尺寸：1280px*720px</div>
                </div>
            </div>
            <div class="flex flex-row items-start  w-w1/2   text-c3 text-f16  mt-w30">
                <div class=" w-w1/4 text-right pr-w20 ">上传视频</div>
                <div class="flex flex-col">
                    <el-upload action="" :show-file-list="false" :on-change="action_select_file_video"
                        :auto-upload="false" accept="video/mp4">
                        <video v-if="s_video.m_video.video" :src="s_video.m_video.videoUrl"
                            style="width: 300px;height: 169px;" autoplay></video>
                        <i v-else class="el-icon-plus avatar-uploader-icon"
                            style="width:300px;height:169px;line-height:169px;"></i>
                    </el-upload>
                    <div class=" mt-w5 text-f15 text-c6">视频尺寸：1920px*1080px</div>
                </div>
            </div>

          <div class="flex flex-row items-center w-w1/2 h-w50 leading-w50 text-c3 text-f16  mt-w30">
            <div class=" w-w1/4 text-right pr-w20">视频类别</div>
            <el-select class=" w-w300 mr-w30" clearable v-model="s_video.m_video.typeId" placeholder="请选择视频类别">
              <el-option v-for="item in s_video.list_type" :key="item.id" :label="item.name" :value="item.id">
              </el-option>
            </el-select>
          </div>

          <div class="flex flex-row items-center w-w1/2 h-w50 leading-w50 text-c3 text-f16  mt-w30">
            <div class=" w-w1/4 text-right pr-w20">是否发布</div>
            <el-radio v-model="s_video.m_video.publish" border label="1">是</el-radio>
            <el-radio v-model="s_video.m_video.publish" border label="0">否</el-radio>
          </div>


            <div class="flex flex-row items-start w-w1/2   text-c3 text-f16  mt-w30">
                <div class=" w-w1/4 text-right pr-w20">视频描述</div>
                <UITinymceEditor :data="s_video.m_video.desc" @editor_change="action_editor_change"
                    class="w-w3/4 h-w500">
                </UITinymceEditor>
            </div>

            <div class="flex flex-row items-start w-w1/2   text-c3 text-f16  mt-w30">
                <div class=" w-w1/4 text-right pr-w20"></div>
                <el-button class="w-w2/4 bg-cmain" type="primary" @click="action_add_video">确定</el-button>
            </div>
        </div>
    </div>
</template>

<script src="./Index.ts"></script>
<style src="./Index.less" lang="less" scoped>

</style>
